StoredLearningSession.CurrentActivityDataModel Property

Gets the data model associated with the current activity in the session.

Parent Type: StoredLearningSession

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public override LearningDataModel CurrentActivityDataModel

{ get; }
Return Value

The data model associated with the current activity.

Exceptions
Exception type Condition
InvalidOperationException

Thrown if there is no current activity in the session or if the current activity is not active.

Remarks

Any changes made to the data model must be saved using the CommitChanges method. If CommitChanges is not called and the session is ended, changes to the data model will be lost.

Initially retrieving the data model could be a long-running task involving database or package file parsing. Subsequent property accesses are fast.